import fetch from 'utils/fetch';
//获得sysCompanyCode
export function forSysCompanyCode(token) {
    return fetch({
      url: '/api/admin/user/front/info',
      method: 'get',
      params: { token }
    });
  }

export function page(query,sysCompanyCode) {   
return fetch({
url: 'api/admin/tSDepart/selectTSDepart?sysCompanyCode='+sysCompanyCode,
method: 'get',
params: query
});
}

export function addObj(obj) {
return fetch({
url: '/api/auth/tSDepart',
method: 'post',
data: obj
});
}

export function getObj(obj) {
return fetch({
url: '/api/auth/tSDepart/' + id,
method: 'put',
data:obj
})
}

export function delObj(id) {
return fetch({
url: '/api/auth/tSDepart/' + id,
method: 'delete'
})
}

export function putObj(obj) {
return fetch({
url: 'api/admin/tSDepart/updateTSDepart',
method: 'put',
data: obj
})
}

//运维角色admin/baseTenantInformation/findByType
export function YWROLE() {
  return fetch({
  url: 'api/admin/baseTenantInformation/findByType',
  method: 'get',

  })
  }
